package com.indusfo.spc.client.controller;

import com.indusfo.spc.annotation.UserLoginToken;
import com.indusfo.spc.client.service.ClientOrderTechService;
import com.indusfo.spc.vo.JSONObject;
import org.apache.ibatis.annotations.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenm
 * @create 2019-12-31 16:47
 */
@RestController
@RequestMapping("/client/orderTech")
public class ClientOrderTechController {

  @Autowired
  private ClientOrderTechService clientOrderTechService;

  @PostMapping("/queryHistory/{orderId}")
  @UserLoginToken
  public JSONObject queryHistory(@PathVariable("orderId") Integer orderId){
    try{
      return clientOrderTechService.queryHistory(orderId);
    }catch(Exception e){
      e.printStackTrace();
      return JSONObject.build(JSONObject.ERROR,"系统出错");
    }
  }

}
